package controller;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import view.GUI;
import view.SplashScreen;

/**
 * Mainklasse zum Starten des Programms
 */
public class MainApplication {

    /**
     * Hauptmethode zum Starten der Anwendung.
     * @param args Argumente der Programmzeile
     */
    public static void main(String[] args) {
        SplashScreen splash = new SplashScreen();
        new Thread(splash).start();
        final long MILLIS = 3000;

        try {
            // Set System L&F
//            UIManager.setLookAndFeel(
//                    UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            // handle exception
        }

        long timeS = System.currentTimeMillis();

        GUI g2 = new GUI();

        long timeV = System.currentTimeMillis();

        if(timeV - timeS < MILLIS){
            try{
                Thread.sleep(MILLIS - (timeV - timeS) );
            }
            catch(Exception ignore){}
        }

        splash.dispose();
        g2.setVisible(true);
    }
}